The present disclosure relates generally to the field of memory virtualization, and more particularly to categorizing page types based on the number of residences for hypervisor page stealing.
In computing, virtual memory is a memory management technique that is implemented using both hardware and software. It maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory. In addition, paging is one of the memory management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. In the paging memory management scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. Paging allows operating systems to use secondary storage for data that does not fit into physical random-access memory (RAM).
Page tables are used to translate the virtual addresses seen by the application into physical addresses used by the hardware to process instructions and such hardware that handles this specific translation is often known as the memory management unit. Each entry in the page table holds a flag indicating whether the corresponding page is in real memory or in another location. The page table entry will contain the real memory address at which the page is stored. Systems can have one page table for the whole system, separate page tables for each application and segment, a tree of page tables for large segments, or a combination of these.
Active memory sharing (AMS) is a memory virtualization technology that allows multiple partitions to share a pool of physical memory. This is designed to increase system memory utilization, thereby enabling a user to realize a cost benefit by reducing the amount of physical memory required. When all physical memory is already in use, the paging supervisor, often called a hypervisor, must free a page in primary storage to hold the swapped-in page, or page that needs to be in physical memory. The hypervisor uses one of a variety of page replacement algorithms such as least recently used (LRU) or a kernel predetermine order like read-only file pages, dirty file pages, client pages, working pages, and klock pages to determine which page to free.